﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:CustomControls="clr-namespace:eStock.Controls.CustomControls">

    <Style TargetType="{x:Type CustomControls:UILabel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CustomControls:UILabel}">
                    <Grid Margin="0,0,0,5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Text="{Binding Path=Header, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="{Binding Path=HeaderWidth, RelativeSource={RelativeSource TemplatedParent}}" 
                                   FontSize="{Binding Path=HeaderSize, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <TextBox IsTabStop="True" Grid.Column="1" Text="{Binding Path=Value, RelativeSource={RelativeSource TemplatedParent}}" IsReadOnly="{Binding Path=ReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                                 Margin="5,0,0,0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type CustomControls:UICustomLabel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CustomControls:UICustomLabel}">
                    <Grid Margin="0,0,0,5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0"  Text="{Binding Path=Header, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="{Binding Path=HeaderWidth, RelativeSource={RelativeSource TemplatedParent}}" 
                                   FontSize="{Binding Path=HeaderSize, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <ContentPresenter Grid.Column="1" Content="{Binding Path=Child, RelativeSource={RelativeSource TemplatedParent}}" Margin="5,0,0,0"/>
                        
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
</ResourceDictionary>
    